package com.example.lawyer.community;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.lawyer.R;
import com.example.lawyer.databind.assembly.GeneralTopTitleData;
import com.example.lawyer.databind.fargment.HomeBData;
import com.example.lawyer.databinding.FragmentPageHomeBBinding;


/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link PageHomeB.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link PageHomeB#newInstance} factory method to
 * create an instance of this fragment.
 */
public class PageHomeB extends Fragment {
    FragmentPageHomeBBinding viewDataBinding = null;
    LayoutInflater layoutInflater;
    ViewGroup viewGroup;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        layoutInflater = inflater;
        viewGroup = container;
        viewDataBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_page_home_b, container, false);

        return viewDataBinding.getRoot();
    }


    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        HomeBData homeBData = new HomeBData();
        GeneralTopTitleData generalTopTitleData = new GeneralTopTitleData();
        generalTopTitleData.title.set("消息");
        generalTopTitleData.isshow.set(false);
        homeBData.generaldata.set(generalTopTitleData);
        viewDataBinding.setHomebdata(homeBData);
    }
}
